<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.staticfile.org/jquery/3.6.4/jquery.min.js"></script>
  <style>
    * {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    ul {
      width: 100%;
      /* height: 100%; */
      height: 100vh;
      display: flex;
      flex-wrap: wrap;
      flex-direction: column;
    }

    .myli {
      min-height: 100px;
      width: 100px;
      background-color: red;
      margin: 10px;
      text-align: center;
      color: white;
      font-size: 20px;
      font-weight: bolder;
      flex-shrink: 0;
    }
  </style>
</head>

<body>
  <img src="//t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF" alt="" srcset="">
  <ul>
    <li class="myli"></li>
  </ul>
  <script>
    $(document).ready(function () {
      let i = 0;
      while (i <= 1000) {
        const clone = $(".myli").last().clone();
        const height = Math.random() * 200 + 100;
        clone.css("height", `${height}px`);
        clone.css("line-height", `${height}px`);
        clone.text(i);
        $(".myli").last().after(clone);
        i++;
      }

    });
  </script>
</body>

</html>